﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Runtime.CompilerServices;

namespace WbsEditor.Extensions.Points
{
    public static class PointExtensions
    {
        public static Point Add(this Point point, Point second)
        {
            return point.Add(second.X, second.Y);
        }
        public static Point Add(this Point point, int x, int y)
        {
            point.X += x;
            point.Y += y;

            return point;
        }
        public static Point Multiply(this Point point, int factor)
        {
            point.X *= factor;
            point.Y *= factor;

            return point;
        }

        public static PointF Add(this PointF point, PointF second)
        {
            point.X += second.X;
            point.Y += second.Y;

            return point;
        }
        public static PointF Multiply(this PointF point, float factor)
        {
            point.X *= factor;
            point.Y *= factor;

            return point;
        }

        public static PointF Multiply(this Point point, float factor)
        {
            PointF result = point;

            result.X *= factor;
            result.Y *= factor;

            return result;
        }
    }
}
